1. Field of the Invention
The present invention relates to a system and method capable of loading a root file system, and more particularly, to an embedded system, automatic loading system, and method capable of automatically loading a root file system.
2. Description of the Prior Art
Embedded systems and their related application devices are increasingly popular. Many devices both in production and in development utilize embedded systems, such as: information appliances (IA), smart phones, and set-top boxes. Embedded systems are typically composed of computer software (e.g., an embedded operating system) and computer hardware (e.g., system single chip). The embedded system is developed based on a specific purpose. Because of this narrow development goal, the embedding system, as compared with a typical personal computer, has advantages including: high stability, small volume, and low cost. Many products such as Palm OS, Windows CE, and Linux utilize embedded systems. The Linux operating system is especially popular because it is available as freeware.
The prior art embedded system downloads the root file system in a flash memory (e.g. a non-volatile memory) corresponding to an embedded operating system. Please refer to FIG. 1. FIG. 1 is a block diagram of a related art embedded system 10. The embedded system 10 comprises a microprocessor 12, a non-volatile memory 14, and a volatile memory 16, wherein the microprocessor 12 is utilized to control operation of the embedded system, the non-volatile memory 14 (e.g. flash memory or ROM) is utilized to record a boot code Boot_Code, a kernel Kernel and a root file system image file RFS. The volatile memory 16 (e.g. DRAM) is utilized to temporarily store program code and operation information required for an operation of the embedded system 10. The boot code Boot_Code is utilized to control the loading of the kernel Kernel. For example, the boot code Boot_Code is a boot loader, which can supply multi-boot to control booting process of the embedded system 10 to utilize the kernel Kernel to control hardware operation of the embedded system 10 by loading the proper kernel Kernel.
Please refer to FIG. 2. FIG. 2 shows a flowchart of loading the embedded system 10. The flowchart includes the following steps:
Step 100: Turn on the embedded system 10.
Step 105: The microprocessor 12 automatically loads the boot code Boot_Code that is stored in the non-volatile memory 14 to the volatile memory 16.
Step 110: The microprocessor 12 retrieves the boot code Boot_Code that is temporally stored in the volatile memory 16 to further execute the boot code Boot_Code to load the kernel Kernel stored in the non-volatile memory 14 to the volatile memory 16.
Step 120: The microprocessor 12 retrieves the kernel Kernel stored in the volatile memory 16 to further execute the kernel Kernel to configure the hardware of the embedded system 10.
Step 130: After the kernel Kernel finishes the configuration of the hardware of the embedded system 10, the microprocessor 12 executes the kernel Kernel to load the root file system image file RFS that is stored in the non-volatile memory 14 to the volatile memory 16.
Step 140: The microprocessor 12 decompresses the root file system image file RFS to generate the needed root file system.
As mentioned above, the embedded system 10 utilizes the non-volatile memory 14 to store the root file system image file RFS applied to the embedded system 10. However, due to cost considerations, the volume of the non-volatile memory 14 is limited. Therefore, the prior art mechanisms for loading the root file system have several defects, such as:
1. Due to the root file system image file RFS size limitation beginning governed by the size of the non-volatile memory 14, optimization of the application software of the root file system image file RFS is not possible.
2. Due to the size limitation of non-volatile memory 14, the embedded system 10 can only accommodate a single root file system image file RFS; and
3. The embedded system 10 can only utilize the root file system image file RFS stored in the non-volatile memory 14 (i.e., the user can not load other root file system image file). These defects make functionality expansion of the embedded system 10 difficult.